package days9.duck;

/**
 * @Author fengzihao
 * @Date 2024-04-23 11:19
 */


public class BaseDuck {
    protected String name = "鸭子";
    private String color;
    private int weight;
    protected String type;

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


    public void shot() {
        System.out.println("嘎嘎嘎嘎");
    }

    public void swimming() {
        System.out.println(name + "在游泳");
    }
}



